import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {HttpClientModule} from '@angular/common/http';

import {AppRoutingModule} from './app-routing.module';
import {AppComponent} from './app.component';
import {NewsComponent} from './components/news/news.component';
import {HomeComponent} from './components/home/home.component';
import {HeaderComponent} from './components/header/header.component';
import {FormsComponent} from './components/forms/forms.component';
import {TodolistComponent} from './components/todolist/todolist.component';
import {StorageService} from './services/storage.service';
import {SearchComponent} from './components/search/search.component';
import {DomComponent} from './components/dom/dom.component';
import {TransitionComponent} from './components/transition/transition.component';
import {ParentComponent} from './components/parent/parent.component';
import {ChildComponent} from './components/child/child.component';
import {LifecycleComponent} from './components/lifecycle/lifecycle.component';
import {RxjsComponent} from './components/rxjs/rxjs.component';
import {HttpComponent} from './components/http/http.component';
import {RouterComponent} from './components/router/router.component';
import {IndexComponent} from './components/router/index/index.component';
import {CenterComponent} from './components/router/center/center.component';
import {DetailComponent} from './components/router/detail/detail.component';
import {Detail2Component} from './components/router/detail2/detail2.component';
import {Detail3Component} from './components/router/detail3/detail3.component';
import {Child1Component} from './components/router/child1/child1.component';
import {Child2Component} from './components/router/child2/child2.component';
import {UserModule} from './module/user/user.module'; //引入自定义模块

@NgModule({
  declarations: [
    AppComponent,
    NewsComponent,
    HomeComponent,
    HeaderComponent,
    FormsComponent,
    TodolistComponent,
    SearchComponent,
    DomComponent,
    TransitionComponent,
    ParentComponent,
    ChildComponent,
    LifecycleComponent,
    RxjsComponent,
    HttpComponent,
    RouterComponent,
    IndexComponent,
    CenterComponent,
    DetailComponent,
    Detail2Component,
    Detail3Component,
    Child1Component,
    Child2Component
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    FormsModule,
    HttpClientModule,
    UserModule,
  ],
  providers: [StorageService],
  bootstrap: [AppComponent]
})
export class AppModule {
}
